# 获取输入字符串，统计字符串中每个字符出现的次数，并输出结果。

def count_char(string):
    countDict = dict()
    for char in string:
        if id(char) >= id("0") and id(char) <= id("9"):
            if countDict.keys().__contains__("num"):
                countDict["num"] += 1
            else:
                countDict["num"] = 1
        elif (id(char) >= id("a") and id(char) <= id("z")) or (id(char) >= id("A") and id(char) <= id("Z")):
            if countDict.keys().__contains__("alpha"):
                countDict["alpha"] += 1
            else:
                countDict["alpha"] = 1
        elif id(char) == id(" "):
            if countDict.keys().__contains__("space"):
                countDict["space"] += 1
            else:
                countDict["space"] = 1
        else:
            if countDict.keys().__contains__("other"):
                countDict["other"] += 1
            else:
                countDict["other"] = 1
    return countDict

if __name__ == '__main__':
    string = input("请输入字符串：")
    countDict = count_char(string)
    print("统计结果：")
    for key in countDict:
        print(key + ":", countDict[key])
                